<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>公共场所情绪表达评估</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }
        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            color: #333;
            line-height: 1.6;
            padding: 20px;
            min-height: 100vh;
        }
        .container {
            max-width: 900px;
            margin: 0 auto;
            background-color: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            padding: 30px;
            position: relative;
            overflow: hidden;
        }
        .container::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, #3498db, #9b59b6, #e74c3c, #f1c40f);
        }
        h1 {
            text-align: center;
            color: #2c3e50;
            margin-bottom: 10px;
            font-size: 2.2rem;
        }
        .subtitle {
            text-align: center;
            color: #7f8c8d;
            margin-bottom: 30px;
            font-size: 1.1rem;
        }
        .scenario-section {
            margin-bottom: 30px;
        }
        h2 {
            color: #3498db;
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid #eaeaea;
        }
        .scenario-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
        .scenario-card {
            background-color: #f8f9fa;
            border-radius: 10px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        .scenario-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background-color: #3498db;
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }
        .scenario-card:hover {
            background-color: #e9ecef;
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        .scenario-card:hover::before {
            transform: scaleX(1);
        }
        .scenario-card.selected {
            border-color: #3498db;
            background-color: #e1f0fa;
        }
        .scenario-card.selected::before {
            transform: scaleX(1);
        }
        .scenario-icon {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }
        .scenario-card h3 {
            color: #2c3e50;
            margin-bottom: 10px;
        }
        .scenario-card p {
            color: #7f8c8d;
            font-size: 0.9rem;
        }
        .emotion-section {
            display: none;
            margin-bottom: 30px;
            animation: fadeIn 0.5s ease;
        }
        .emotion-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 12px;
            margin-bottom: 20px;
        }
        .emotion-btn {
            padding: 12px 15px;
            background-color: #ecf0f1;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
        }
        .emotion-btn:hover {
            background-color: #d5dbdb;
            transform: translateY(-3px);
        }
        .emotion-btn.selected {
            background-color: #3498db;
            color: white;
            box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
        }
        .result-section {
            display: none;
            background-color: #f8f9fa;
            border-radius: 10px;
            padding: 25px;
            margin-top: 20px;
            animation: fadeIn 0.5s ease;
            border-left: 5px solid #3498db;
        }
        .result-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        .result-icon {
            font-size: 1.8rem;
            margin-right: 15px;
        }
        .result-appropriate {
            color: #27ae60;
            font-weight: bold;
            font-size: 1.3rem;
        }
        .result-inappropriate {
            color: #e74c3c;
            font-weight: bold;
            font-size: 1.3rem;
        }
        .reason {
            margin-top: 15px;
            padding: 15px;
            background-color: #e9ecef;
            border-radius: 8px;
            line-height: 1.7;
        }
        .comparison-note {
            margin-top: 15px;
            padding: 12px;
            background-color: #fff3cd;
            border-radius: 8px;
            border-left: 4px solid #ffc107;
            font-style: italic;
        }
        .reset-btn {
            display: block;
            margin: 20px auto 0;
            padding: 12px 25px;
            background: linear-gradient(to right, #3498db, #9b59b6);
            color: white;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }
        .reset-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
        }
        .footer {
            text-align: center;
            margin-top: 30px;
            color: #7f8c8d;
            font-size: 0.9rem;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>公共场所情绪表达评估</h1>
        <p class="subtitle">探索不同场合下情绪表达的合适性，理解环境对情绪表达的影响</p>
        
        <div class="scenario-section">
            <h2>选择公共场所场景</h2>
            <div class="scenario-cards">
                <div class="scenario-card" data-scenario="1">
                    <div class="scenario-icon">🏥</div>
                    <h3>医院候诊区</h3>
                    <p>安静、需要体谅他人的环境</p>
                </div>
                <div class="scenario-card" data-scenario="2">
                    <div class="scenario-icon">📚</div>
                    <h3>图书馆</h3>
                    <p>需要保持安静的学习环境</p>
                </div>
                <div class="scenario-card" data-scenario="3">
                    <div class="scenario-icon">🎭</div>
                    <h3>电影院</h3>
                    <p>需要安静欣赏的娱乐场所</p>
                </div>
                <div class="scenario-card" data-scenario="4">
                    <div class="scenario-icon">⚽</div>
                    <h3>体育比赛现场</h3>
                    <p>充满激情与竞争的环境</p>
                </div>
            </div>
        </div>
        
        <div class="emotion-section" id="emotion-section">
            <h2>选择你的情绪表达方式</h2>
            <div class="emotion-options" id="emotion-options">
                <!-- 情绪选项将通过JavaScript动态生成 -->
            </div>
        </div>
        
        <div class="result-section" id="result-section">
            <h2>评估结果</h2>
            <div class="result-header">
                <div class="result-icon" id="result-icon">❓</div>
                <div id="result-text"></div>
            </div>
            <div class="reason" id="reason-text"></div>
            <div class="comparison-note" id="comparison-note"></div>
            <button class="reset-btn" id="reset-btn">尝试其他场景</button>
        </div>
        
        <div class="footer">
            <p>情绪表达评估工具 | 帮助学生理解不同场合的情绪表达规范</p>
        </div>
    </div>

    <script>
        // 场景和情绪数据
        const scenarios = {
            1: {
                title: "医院候诊区",
                description: "安静、需要体谅他人的环境",
                emotions: {
                    "大声谈笑": {
                        appropriate: false,
                        reason: "在医院候诊区大声谈笑会打扰需要安静环境的病人和医护人员，显得缺乏同理心。",
                        comparison: "但在体育比赛现场，大声欢呼和谈笑是表达热情和支持的合适方式。"
                    },
                    "安静等待": {
                        appropriate: true,
                        reason: "在医院保持安静是对病人和医护人员的尊重，体现了良好的公共素养。"
                    },
                    "烦躁不安": {
                        appropriate: false,
                        reason: "表现出明显的烦躁不安会增加周围人的焦虑感，不利于营造平静的医疗环境。",
                        comparison: "在体育比赛等充满激情的场合，适度的兴奋和紧张是合适的情绪表达。"
                    },
                    "轻声安慰": {
                        appropriate: true,
                        reason: "轻声安慰同行的家人或朋友体现了关怀，同时不会打扰其他候诊者。"
                    }
                }
            },
            2: {
                title: "图书馆",
                description: "需要保持安静的学习环境",
                emotions: {
                    "大声谈笑": {
                        appropriate: false,
                        reason: "在图书馆大声谈笑会严重影响他人的学习和阅读，违背了图书馆的基本规则。",
                        comparison: "同样的行为在体育比赛现场则是表达热情和支持的常见方式。"
                    },
                    "安静专注": {
                        appropriate: true,
                        reason: "在图书馆保持安静专注是对其他读者的尊重，也是高效学习的基本要求。"
                    },
                    "兴奋欢呼": {
                        appropriate: false,
                        reason: "即使在阅读到精彩内容时，也不应在图书馆兴奋欢呼，这会打扰他人。",
                        comparison: "但在体育比赛现场，为精彩瞬间欢呼是观众参与的重要方式。"
                    },
                    "轻声交流": {
                        appropriate: true,
                        reason: "在讨论区或适当场合与同伴轻声交流是可以接受的，但需控制音量。"
                    }
                }
            },
            3: {
                title: "电影院",
                description: "需要安静欣赏的娱乐场所",
                emotions: {
                    "大声谈笑": {
                        appropriate: false,
                        reason: "在电影放映期间大声谈笑会严重影响他人观影体验，是极不礼貌的行为。",
                        comparison: "同样的行为在体育比赛现场则是表达热情和支持的常见方式。"
                    },
                    "安静观看": {
                        appropriate: true,
                        reason: "在电影院保持安静是对其他观众和影片的尊重，是基本的观影礼仪。"
                    },
                    "兴奋欢呼": {
                        appropriate: false,
                        reason: "即使在精彩场景，过度的欢呼也会打扰他人沉浸式观影体验。",
                        comparison: "但在体育比赛现场，为精彩瞬间欢呼是观众参与的重要方式。"
                    },
                    "轻声评论": {
                        appropriate: true,
                        reason: "偶尔与同伴轻声交流对影片的看法是可以接受的，但需控制音量和频率。"
                    }
                }
            },
            4: {
                title: "体育比赛现场",
                description: "充满激情与竞争的环境",
                emotions: {
                    "大声谈笑": {
                        appropriate: true,
                        reason: "在体育比赛现场，与朋友大声谈笑、讨论比赛是表达热情和享受比赛的方式。",
                        comparison: "同样的行为在医院候诊区则会被视为不合适的打扰。"
                    },
                    "安静观看": {
                        appropriate: false,
                        reason: "在激烈的比赛现场过于安静会显得缺乏参与感，与现场氛围不协调。",
                        comparison: "但在电影院，安静观看是尊重他人和影片的基本要求。"
                    },
                    "兴奋欢呼": {
                        appropriate: true,
                        reason: "为精彩表现或得分欢呼是体育比赛文化的一部分，能增强现场氛围。",
                        comparison: "同样的欢呼在医院候诊区则会严重打扰需要安静的患者。"
                    },
                    "烦躁不安": {
                        appropriate: false,
                        reason: "虽然体育比赛可能令人紧张，但过度表现出烦躁不安会影响周围观众的观赛体验。"
                    }
                }
            }
        };

        // DOM元素
        const scenarioCards = document.querySelectorAll('.scenario-card');
        const emotionSection = document.getElementById('emotion-section');
        const emotionOptions = document.getElementById('emotion-options');
        const resultSection = document.getElementById('result-section');
        const resultText = document.getElementById('result-text');
        const resultIcon = document.getElementById('result-icon');
        const reasonText = document.getElementById('reason-text');
        const comparisonNote = document.getElementById('comparison-note');
        const resetBtn = document.getElementById('reset-btn');

        let selectedScenario = null;

        // 场景选择事件
        scenarioCards.forEach(card => {
            card.addEventListener('click', () => {
                // 移除之前的选择
                scenarioCards.forEach(c => c.classList.remove('selected'));
                // 标记当前选择
                card.classList.add('selected');
                
                selectedScenario = card.getAttribute('data-scenario');
                
                // 显示情绪选择区域
                emotionSection.style.display = 'block';
                
                // 生成情绪选项
                emotionOptions.innerHTML = '';
                const emotions = scenarios[selectedScenario].emotions;
                
                for (const emotion in emotions) {
                    const button = document.createElement('button');
                    button.className = 'emotion-btn';
                    button.textContent = emotion;
                    button.addEventListener('click', () => {
                        // 移除之前的选择
                        document.querySelectorAll('.emotion-btn').forEach(btn => {
                            btn.classList.remove('selected');
                        });
                        // 标记当前选择
                        button.classList.add('selected');
                        
                        // 显示结果
                        showResult(emotion, emotions[emotion]);
                    });
                    emotionOptions.appendChild(button);
                }
                
                // 隐藏之前的结果
                resultSection.style.display = 'none';
                
                // 滚动到情绪选择区域
                emotionSection.scrollIntoView({ behavior: 'smooth' });
            });
        });

        // 显示结果函数
        function showResult(emotion, data) {
            resultSection.style.display = 'block';
            
            if (data.appropriate) {
                resultText.innerHTML = `<div class="result-appropriate">表达"${emotion}"在这个场景中是合适的</div>`;
                resultIcon.textContent = "✅";
            } else {
                resultText.innerHTML = `<div class="result-inappropriate">表达"${emotion}"在这个场景中是不合适的</div>`;
                resultIcon.textContent = "❌";
            }
            
            reasonText.textContent = data.reason;
            
            // 显示对比说明（如果有）
            if (data.comparison) {
                comparisonNote.textContent = data.comparison;
                comparisonNote.style.display = 'block';
            } else {
                comparisonNote.style.display = 'none';
            }
            
            // 滚动到结果区域
            resultSection.scrollIntoView({ behavior: 'smooth' });
        }

        // 重置按钮事件
        resetBtn.addEventListener('click', () => {
            // 重置所有选择
            scenarioCards.forEach(c => c.classList.remove('selected'));
            document.querySelectorAll('.emotion-btn').forEach(btn => {
                btn.classList.remove('selected');
            });
            
            // 隐藏情绪选择和结果区域
            emotionSection.style.display = 'none';
            resultSection.style.display = 'none';
            
            // 重置变量
            selectedScenario = null;
            
            // 滚动到顶部
            window.scrollTo({ top: 0, behavior: 'smooth' });
        });
    </script>
</body>
</html>